package com;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

class Test1 implements Comparable{
	
	private String zhang;
	
	public static void main(String[] args) {
		// TODO 自动生成方法存根
	}

	public void f1() {
		System.out.println("f1");
	}

	// 无法被子类覆盖的方法
	public final void f2() {
		System.out.println("f2");
	}

	public void f3() {
		System.out.println("f3");
	}

	public void f4(final FareClassOcc arg1, final String arg2) {
		arg1.setTicketCode("gggg");
		FareClassOcc occ = new FareClassOcc();
	}

	@Override
	public int compareTo(Object arg0) {
		
		return 0;
	}
	
	public static void test(List zhang){
		if(zhang.contains("zhang")){
			System.out.println("zhang");
		}else{
			System.out.println("dong");
		}
	}
}

public class Test2 extends Test1 {

	public void f1() {
		System.out.println("Test1父类方法f1被覆盖!");
	}

	public static void main(String[] args) 
	{
/*		String test = "RULES_REC3_CAT15";
		test.contains("cat15");
		System.out.println(test.contains("CAT15"));
		Test2 t = new Test2();
		t.f1();
		t.f2(); // 调用从父类继承过来的final方法
		t.f3(); // 调用从父类继承过来的方法
		t.f4(new FareClassOcc(), "dong");
		System.out.println(args);
		//Test1.test(null);
		Object zhang = new Object();
		Object dong  = new Object();
		System.out.println(zhang.equals(dong));
		System.out.println(zhang == dong);
		
		Set set = new HashSet();
		System.out.println(set.add(zhang));
		System.out.println(set.add(zhang));
		set.add(null);
		*/
		String a = "abc";
		String b = "baa";
		System.out.println(a.compareTo(b));
		
	}
}